<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.prime.com.tr/ui">

<ui:composition>

    <p:dialog header="Criar chave de resposta" widgetVar="create_key_response" resizable="false" showEffect="clip" hideEffect="clip" modal="true" position="top" width="440">
        <h:panelGrid id="panel_create_key_response" columns="2" style="margin-bottom:10px">

            <h:outputLabel value="Chave:" />
            <h:inputText value="#{clientDashboardMBean.createKeyResponse.name}" size="12" maxlength="12" />

            <h:outputLabel value="Dica:" />
            <h:inputText value="#{clientDashboardMBean.createKeyResponse.tip}" size="45" maxlength="45"/>
        </h:panelGrid>
        <br/>
        <p:commandButton value="Confirmar" update="growl, pnlKeyResponse" actionListener="#{clientDashboardMBean.createKeyResponse}" oncomplete="create_key_response.hide();"/>
        <p:commandButton value="Cancelar" oncomplete="create_key_response.hide();"/>
    </p:dialog>

    <p:dialog header="Editar chave de resposta" widgetVar="edit_key_response" resizable="false" showEffect="clip" hideEffect="clip" modal="true" position="top" width="440">
        <h:panelGrid id="panel_edit_key_response" columns="2" style="margin-bottom:10px">

            <h:outputLabel value="Chave:" />
            <h:inputText value="#{clientDashboardMBean.selectedKeyResponse.name}" size="12" maxlength="12" />

            <h:outputLabel value="Dica:" />
            <h:inputText value="#{clientDashboardMBean.selectedKeyResponse.tip}" size="45" maxlength="45"/>

        </h:panelGrid>
        <br/>
        <p:commandButton value="Confirmar" update="growl, pnlKeyResponse" actionListener="#{clientDashboardMBean.updateKeyResponse}" oncomplete="edit_key_response.hide();"/>
        <p:commandButton value="Padrão" update="growl, pnlKeyResponse" actionListener="#{clientDashboardMBean.makeDefault}" oncomplete="edit_key_response.hide();"/>
        <p:commandButton value="Cancelar" oncomplete="edit_key_response.hide();"/>
    </p:dialog>

</ui:composition>
</html>